package com.javase.SY05;

public class Rectangle extends Point {
    int length, width;

    public Rectangle(int x, int y, int length, int width) {
        super(x, y);
        this.length = length;
        this.width = width;
    }

    public Rectangle(int length, int width) {
        super();
        this.length = length;
        this.width = width;
    }

    public Rectangle(){
        this(0, 0, 10, 10);
    }

    public void show(){
        super.show();
        System.out.println("length:" + length + "  width:" + width);
    }

    public void area(){
        int area = length * width;
        System.out.println("area:" + area);
    }


}
